/* vim: set sw=8 ts=8 sts=8 expandtab: */
#ifndef CMAID_SET_H
#define CMAID_SET_H

/**
 * @defgroup Cmaid_Set The Set Class
 * @ingroup Classes
 * @brief tbd
 *
 * XXX TBD
 */
/**
 * @brief Type definition of the Set Class
 * @ingroup Cmaid_Set
 */
typedef Cmaid_Container Cmaid_Set;

/**
 * @defgroup Cmaid_Set_Interface The Set Interface
 * @ingroup Cmaid_Set
 *
 * You only have to deal with the interface structure directly, if you are
 * going to write an implementation of the interface. Else you can safely
 * ignore this.
 *
 * @{
 */
/** Type definition for the @em add callback */
typedef void *(*Cmaid_Set_Add_Cb)(Cmaid_Set *s, const void *data);
/** Type definition for the @em remove callback */
typedef void  (*Cmaid_Set_Remove_Cb)(Cmaid_Set *s, const void *data);
/** Type definition for the @em get callback */
typedef void *(*Cmaid_Set_Get_Cb)(Cmaid_Set *s, const void *data);

/** Type definition for the @em set interface */
typedef struct Cmaid_Set_Interface Cmaid_Set_Interface;

/**
 * @brief The Set Interface structure
 * The set interface is inheriting from the container and thus must also
 * have interface functions for the container.
 */
struct Cmaid_Set_Interface
{
        Cmaid_Container_Interface container_if;
        Cmaid_Set_Add_Cb          add;
        Cmaid_Set_Remove_Cb       remove;
        Cmaid_Set_Get_Cb          get;
};
/**
 * @}
 */

/**
 * @addtogroup Cmaid_Set
 * @{
 */
CMAID_INLINE void      *cmaid_set_add(Cmaid_Set *s, const void *data);
CMAID_INLINE void       cmaid_set_remove(Cmaid_Set *s, const void *data);
CMAID_INLINE void      *cmaid_set_get(Cmaid_Set *s, const void *data);
/**
 * @}
 */

#include <cmaid_set_funcdef.h>

#endif
